package pri.zxx.testdemo;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xigua
 * @desc  传引用数据类型进去，无法改变具体值
 * @createTime 2022-01-06-上午10:59
 */
public class ReferencesTest {

    public void inset(){
        Map<String,Integer> s = new HashMap<>();
        s.put("s", 10);
        change(s);
        System.out.println(s.get("s"));
    }
    public void change(Map<String, Integer> s){
        s = new HashMap<>();
        s.put("s", 20);
    }

    public static void main(String[] args) {
        ReferencesTest referencesTest = new ReferencesTest();
        referencesTest.inset();
    }
}
